Permission Regions for Race-Free Parallelism
نویسندگان
چکیده
It is difficult to write parallel programs that are correct. This is because of the potential for data races, when parallel tasks access shared data in complex and unexpected ways. A classic approach to addressing this problem is dynamic race detection, which has the benefits of working transparently to the programmer and not raising any false alarms. Unfortunately, dynamic race detection is very slow in practice; further, it can only detect low-level races, not high-level races which are also known as atomicity violations. In this paper, we present a new approach to dynamic detection of data races and atomicity violations based on the concept of permission regions, which are regions of code that have permission to read or write certain variables. Dynamic checks are used to ensure that no conflicting permission regions execute in parallel, thereby allowing the granularity of checks to be adjusted according to the size of permission regions. We demonstrate that permission regions can be used to achieve significantly better performance than past work on dynamic race detection, to the point where they could be used to enable always on race detection for both lowand high-level races in production code.
منابع مشابه
Implementing a Parallelism Library for a Functional Subset of LISP
This paper discusses four primitives supporting parallel evaluation for a functional subset of LISP, specifically that subset supported by the ACL2 theorem prover. These primitives can be used to provide parallel execution for functions free from side effects without considering race conditions, deadlocks, and other common parallelism pitfalls. We (1) introduce logical definitions for these pri...
متن کاملTask-Aware Optimization of Dynamic Fractional Permissions
Boyland’s original work on fractional permissions introduced a mechanism to statically reason about the correct use of shared memory in concurrent programs. Permissions are linear capabilities that can be passed from one task to another. By splitting a permission into fractions, a task can grant multiple other tasks concurrent read access. Because writing data requires the full permission– and ...
متن کاملProgramming with Sociable Resources
We present a model for shared-memory parallel programming that makes shared objects (“resources”) the drivers of heap-manipulating parallel computations. The model aims to syntactically capture patterns of spatial locality in heap updates and to express the maximum amount of logical parallelism in computations. To achieve this, we take a “resources’-eye” view of parallel operations on the heap....
متن کاملThread Parallelism for Highly Irregular Computation in Anisotropic Mesh Adaptation
Thread-level parallelism in irregular applications with mutable data dependencies presents challenges because the underlying data is extensively modified during execution of the algorithm and a high degree of parallelism must be realized while keeping the code race-free. In this article we describe a methodology for exploiting thread parallelism for a class of graph-mutating worklist algorithms...
متن کاملOn-the-fly Detection of the First Races in Programs with Nested Parallelism
Detecting races is important for debugging shared-memory parallel programs , because the races result in unintended nondeterministic executions of the programs. Previous on-they techniques to detect races in programs with nested parallelism cannot guarantee that the race detected rst is not preceded by events that also participate in a race (occurred rst in our terminology). This paper presents...
متن کامل